﻿using Mbl.ParameterizedTest.AcceptanceTests.CalculatorTests;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using System.Collections.Generic;

namespace Mbl.ParameterizedTest.AcceptanceTests.GeneralExpectationTests
{
    [TestClass]
    public class ResultTypeTests
    {
        [TestMethod]
        [ExpectedFailedTestCases(3)]
        public void Assertion_can_be_made_based_on_actual_return_type()
        {
            ParameterizedTest
                .For<string, IList<string>>(s => new List<string> { s })
                .Given("asdf").ExpectInstanceOf<List<string>>().Because("It's correct")
                .Given("asdf").ExpectInstanceOf(typeof(List<string>)).Because("It's correct")
                .Given("asdf").ExpectInstanceOf<string[]>().Because("It's wrong")
                .Evaluate();
        }
    }
}
